<?php 
	$currentPage = !empty($_GET['p']) ? $_GET['p'] : 1;
	$list = $this->getNews($currentPage);
?>
<div class="fl kf-center">
			<div class="bk-a">
				<br /><div id="title"><a href="index.php">首页</a>&nbsp;&gt;&nbsp;<span id="sysSubNav"></span></div>
				<div class="jdxw">
					<p class="kf-begin">酒店新闻</p>
					<div class="bk-l"></div><br />
					<ul class="ml20">
						<?php 
							foreach ($list->getData() as $key => $value) {
								if ($key > 0)
								{
									echo '<li class="yd-fx-bk cb mt10 mb10"></li>';
								}
								$publishTime = strtotime($value["publish_time"]);
								echo '<li><span l="l">'.date("m-d", $publishTime).'<br />'.date("Y", $publishTime).'</span>';
								echo '<a href="?r=news/detail&id='.$value["id"].'" style="color:#000"><span>';
								echo $value["title"];
								echo '<br />';
								$content = $value["content"];
								if (strlen($content) > 35)
								{
									$content = substr($content, 0, 90).'...';
								}
								echo $content;
								echo '</span></a></li>';
							}
						?>
					</ul>
					<div id="pagination" style="clear: both; margin-top: 30px;"></div>
					<script type="text/javascript" src="js/jquery.paginate.js"></script>
					
					<script type="text/javascript">
						$("#pagination").paginate({
							count: <?php echo $list->getPagination()->getPageCount() ?>,
							start: <?php echo $currentPage ?>,
							display: <?php echo $list->getPagination()->getPageCount() ?>,
							border: true,
							border_color: '#fff',
							text_color: '#fff',
							background_color: 'black',
							border_hover_color: '#ccc',
							text_hover_color: '#000',
							background_hover_color: '#fff',
							images: false,
							mouse: 'press',
							onChange: function(page) {
								$('._current', '#pagination').removeClass('_current').hide();
								$('#p' + page).addClass('_current').show();
								window.location.href = changeURLArg(window.location.href, 'p', page);
							}
						});
					</script>
				</div>
			</div>
		</div>